package com.base.cn.platform.os.controller.subject;

import com.base.cn.platform.os.common.utils.result.ResultUtil;
import com.base.cn.platform.os.controller.cmmon.ApiBaseController;
import com.base.cn.platform.os.service.manage.subject.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 专业数据接口
 *
 * @author s.li
 * @create 2018-09-06-14:00
 */
@RestController
@RequestMapping("/api/subject")
public class ApiSubjectController extends ApiBaseController {

    @Autowired
    private SubjectService subjectService;

    /**
     * 专业列表
     * @return
     */
    @RequestMapping("/querySubjectList")
    public Map<String,Object> querySubjectList(){
        Map<String, Object> params = new HashMap<>();
        params.put("status",1);//查询状态正常的
        List<Map<String,Object>> subjectMapList = subjectService.findLayeredSubjectList(params);
        return ResultUtil.SUCCESS(subjectMapList);
    }
}
